import request from '@/utils/request'
export default {
  getPageList(page, limit, searchObj) {
    return request({
      url: `/asManager/assetFront/getFrontAssetList/${page}/${limit}`,
      method: 'post',
      data: searchObj
    })
  },
 getAllCategory() {
    return request({
      url: `/asManager/category/tree`,
      method: 'get'
    })
  },

 getAssetById(assetId){
    return request({
      url: `/asManager/assetFront/getFrontAssetInfo/${assetId}`,
      method: 'get'
    })
  },
  outAsset(out){
    return request({
      url: `/asManager/assetFront/outAsset`,
      method: 'post',
      data: out
    })
  },
  getBackPageList(page, limit, searchObj){
    return request({
      url: `/asManager/assetFront/getBackAssetList/${page}/${limit}`,
      method: 'post',
      data: searchObj
    })
  },
  backAsset(id){
    return request({
      url: `/asManager/assetFront/backAsset/${id}`,
      method: 'get'
    })
  },
  repairAsset(id){
    return request({
      url: `/asManager/assetFront/repairAsset/${id}`,
      method: 'get'
    })
  },
  getAssetApplyListPage(id){
    return request({
      url: `/asManager/apply/getAssetApplyListPage`,
      method: 'get'
    })
  },
  addAssetApply(asset){
    return request({
      url: `/asManager/apply/addAssetApply`,
      method: 'post',
      data: asset
    })
  },
}
